package cn.net.autocode.platform.viewEngine;

import org.thymeleaf.TemplateEngine;
import org.thymeleaf.context.Context;
import java.util.Map;


public class AutoCodeThymeleafEngine {
    private final static TemplateEngine viewTemplateEngine=new TemplateEngine();

    public static String renderTemplate(String template, Map<String, Object> model) {
        Context context = new Context();
        context.setVariables(model);
        return viewTemplateEngine.process(template, context);
    }
}
